using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_ChiTietHoSoDatMuaHangManagerBase
    {
        public TBL_ChiTietHoSoDatMuaHangManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity Insert(TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity Update(TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity UpdateWithCondition(TBL_ChiTietHoSoDatMuaHangEntity obj,TBL_ChiTietHoSoDatMuaHangEntity objCond)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_ChiTietHoSoDatMuaHangEntity Delete(TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteWithCondition(TBL_ChiTietHoSoDatMuaHangEntity objCond)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaCTDatMH (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaCTDatMH");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaCTDatMH 
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaCTDatMH (string MaCTDatMH )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaCTDatMH = MaCTDatMH;  
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaCTDatMH");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaHSo (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaHSo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaHSo 
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaHSo (string MaHSo )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaHSo = MaHSo;  
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaHSo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaTB (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaTB 
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteByMaTB (string MaTB )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaTB = MaTB;  
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"MaTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteBySoLuong (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"SoLuong");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien SoLuong 
        /// </summary>
        /// <returns>TBL_ChiTietHoSoDatMuaHangEntity</returns>
        public TBL_ChiTietHoSoDatMuaHangEntity DeleteBySoLuong (int SoLuong )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.SoLuong = SoLuong;  
            return (TBL_ChiTietHoSoDatMuaHangEntity)Adapter.DeleteByField(obj,"SoLuong");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_ChiTietHoSoDatMuaHangEntity Select(TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return (TBL_ChiTietHoSoDatMuaHangEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_ChiTietHoSoDatMuaHangEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_ChiTietHoSoDatMuaHangEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectAllLST()
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_ChiTietHoSoDatMuaHangEntity()),new TBL_ChiTietHoSoDatMuaHangEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_ChiTietHoSoDatMuaHangEntity(),option),new TBL_ChiTietHoSoDatMuaHangEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTDatMH (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaCTDatMH");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTDatMH (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaCTDatMH",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaCTDatMHLST (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTDatMH"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaCTDatMHLST (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaCTDatMH",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTDatMH (string MaCTDatMH )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaCTDatMH = MaCTDatMH;  
            return Adapter.SelectByField(obj,"MaCTDatMH");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaCTDatMH (string MaCTDatMH, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaCTDatMH = MaCTDatMH;  
            return Adapter.SelectByField(obj,"MaCTDatMH",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaCTDatMHLST (string MaCTDatMH )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaCTDatMH = MaCTDatMH;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTDatMH"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaCTDatMH duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaCTDatMHLST (string MaCTDatMH, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaCTDatMH = MaCTDatMH;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaCTDatMH",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaHSo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaHSo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaHSoLST (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaHSoLST (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaHSo",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (string MaHSo )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaHSo = MaHSo;  
            return Adapter.SelectByField(obj,"MaHSo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaHSo (string MaHSo, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaHSo = MaHSo;  
            return Adapter.SelectByField(obj,"MaHSo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaHSoLST (string MaHSo )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaHSo = MaHSo;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaHSo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaHSoLST (string MaHSo, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaHSo = MaHSo;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaHSo",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaTBLST (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaTBLST (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaTB",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (string MaTB )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaTB = MaTB;  
            return Adapter.SelectByField(obj,"MaTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaTB (string MaTB, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaTB = MaTB;  
            return Adapter.SelectByField(obj,"MaTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaTBLST (string MaTB )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaTB = MaTB;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectByMaTBLST (string MaTB, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.MaTB = MaTB;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaTB",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return Adapter.SelectByField(obj,"SoLuong");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"SoLuong",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectBySoLuongLST (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectBySoLuongLST (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"SoLuong",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (int SoLuong )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.SoLuong = SoLuong;  
            return Adapter.SelectByField(obj,"SoLuong");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySoLuong (int SoLuong, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.SoLuong = SoLuong;  
            return Adapter.SelectByField(obj,"SoLuong",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectBySoLuongLST (int SoLuong )
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.SoLuong = SoLuong;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong"),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien SoLuong duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectBySoLuongLST (int SoLuong, SelectOptions option)
        { 
            TBL_ChiTietHoSoDatMuaHangEntity obj = new TBL_ChiTietHoSoDatMuaHangEntity();
            obj.SoLuong = SoLuong;  
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"SoLuong",option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectWithConditionLST (TBL_ChiTietHoSoDatMuaHangEntity obj)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_ChiTietHoSoDatMuaHangEntity></returns>
        public List<TBL_ChiTietHoSoDatMuaHangEntity> SelectWithConditionLST (TBL_ChiTietHoSoDatMuaHangEntity obj,SelectOptions option)
        { 
            return  (List<TBL_ChiTietHoSoDatMuaHangEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_ChiTietHoSoDatMuaHangEntity());
        }

}
}
